Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UserMenu.cshtml #100

Merged
merged 3 commits into from
Oct 18, 2023
Merged

Conversation

MikeAlhayek
Copy link
Contributor

No description provided.

@@ -32,6 +29,9 @@
<li><a class="dropdown-item" asp-area="OrchardCore.Users" asp-action="Display" asp-controller="Admin" asp-route-id="@userId" asp-route-returnUrl="@FullRequestPath"><span><i class="far fa-address-card" aria-hidden="true"></i></span>&nbsp;<span> @T["Profile"]</span></a></li>
}
<li><a class="dropdown-item" asp-area="OrchardCore.Users" asp-controller="Account" asp-action="ChangePassword" asp-route-returnUrl="@FullRequestPath"><span><i class="fas fa-key" aria-hidden="true"></i></span>&nbsp;<span> @T["Change password"]</span></a></li>

@await RenderSectionAsync("UserMenuItems", required: false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's something new we added to allow others to inject items in this menu. We should at some point submit a PR to remove most of these menu items from the view and use filters to inject them into the view

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to hear that, I will have a look and merge your PR ASAP

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeAlhayek I presume this should be in the Users module, right? after that we can inject the menu items from other modules

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should only be in UserMenu view which will optionally allow others to inject into this zone

TODO: Use CommonPermissions.EditOwnUser once 1.6.0 is released
*@
@if (await AuthorizationService.AuthorizeAsync(User, CommonPermissions.ManageUsers))
@if (await AuthorizationService.AuthorizeAsync(User, CommonPermissions.EditOwnUser))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build failed, we need to upgrade to 1.6.0, I will update in another PR then I will merge this

@hishamco
Copy link
Member

@MikeAlhayek could you please rebase on the master branch, so I can merge this one

@hishamco
Copy link
Member

Could you please rebase, so I can merge this?

@MikeAlhayek
Copy link
Contributor Author

done

@hishamco
Copy link
Member

Please do it one more time, there was a build issue, that has been fixed and merged

@MikeAlhayek
Copy link
Contributor Author

done

@hishamco hishamco merged commit f88679a into OrchardCoreContrib:main Oct 18, 2023
1 check passed
@hishamco
Copy link
Member

Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants